package com.jd.tools;

import java.util.Calendar;

public class DateTool {
	public static String getCurrentYMD() {
		Calendar rightNow = Calendar.getInstance();
		return rightNow.get(Calendar.YEAR)+"-"+(rightNow.get(Calendar.MONTH)+1)+"-"+rightNow.get(Calendar.DAY_OF_MONTH);
	}
	public static String getCurrentTime() {
		Calendar rightNow = Calendar.getInstance();
		return rightNow.get(Calendar.YEAR)+"-"+(rightNow.get(Calendar.MONTH)+1)+"-"+rightNow.get(Calendar.DAY_OF_MONTH)+"-"+rightNow.get(Calendar.HOUR_OF_DAY)+"."+rightNow.get(Calendar.MINUTE)+"."+rightNow.get(Calendar.SECOND);
	}
	public static void main(String[] args) {
		System.out.println(getCurrentYMD());
	}
}
